<?php include_partial("gestionadministracion/menuadmin") ?>

<div id="sf_admin_container" style="width: 100%;height: 100%">
<div style = "display: table;  width:100%;">

<h1>Zonas</h1>
<div >
  <a  align="left" href="<?php echo url_for('zona/new') ?>">   
      <img  src="/images/botonagregar.jpg" width="69" height="22" border="1"/>
  </a>
 </div>
 <div style="float:left;width: 78%;margin-top:0px;">
         <div id="listadoZonas">
                <?php
                if (count($zonas) != 0) {
                    include_partial("zona/listadozonas", array("zonas" => $zonas));
                }
                ?>
            </div>
            <br>
            
   </div>
<div id="sf_admin_filter"style = "float: right; height: 75px; width:21%">
<?php
            echo jq_form_remote_tag(array(
                'update' => 'listadoZonas',
                'url' => 'zona/buscarZonas',
                'loading' => "$('#loadingZonas').css('display', '')",
                'complete' => "$('#loadingZonas').css('display', 'none')"
            ))
            ?>
           <table >
                <thead><tr><th colspan="2"><span style="float:left">FILTRO</span></th></tr></thead>
                <tbody id="filtros" >
                <tr>
                    <td >
                        <label for="zona"><b>Nombre</b></label>
                    </td>
                    <td >
                        <input id="nombre" name="nombre" style="text-transform:uppercase;" onkeyup="javascript:this.value=this.value.toUpperCase();">  
                    </td>
                </tr>
                
                <tr>
                    <td colspan="2">
                        <input type="submit" style="float:right" value="Filtrar" onmouseover="style.cursor=cursor"/>
                        <span id="loadingZonas" style="float:right;margin-right:10px;display: none;">
                            <img src="/images/load.gif">
                        </span>
                    </td>
                </tr>
            </tbody>
            </table>
        </div>
        </div>   
    </div>
<!--<table>
  <thead>
    <tr>
      <th>Id</th>
      <th>Nombre</th>
    </tr>
  </thead>
  <tbody>
    <!?php foreach ($zonas as $zona): ?>
    <tr>
      <td><a href="<!?php echo url_for('zona/edit?id='.$zona->getId()) ?>"><!?php echo $zona->getId() ?></a></td>
      <td><!?php echo $zona->getNombre() ?></td>
    </tr>
    <!?php endforeach; ?>
  </tbody>
</table>

  <a href="<!?php echo url_for('zona/new') ?>">New</a>
        </div>
  
    </div>
 -->
